On the accuracy of finite element approximations to a class of interface problems