On the coupling of boundary integral and finite element methods