A method for the finite element solution of scattering problems in unbounded domains