Hermite finite elements for second order boundary value problems with sharp gradient discontinuities