A numerical method is proposed for the solution of the inverse scattering problem. This problem consists of determining the location and shape of an unknown number of inclusions composed by a homogeneous material with known mechanical properties different that those of the surrounding medium. The information available to solve the inverse problem are measurements of the fundamental mechanical magnitude of the wave propagation problem. At the boundary of the scatterers, transmission conditions depending on the material properties are considered. For the solution of the forward problem, a coupled extended finite element method (XFEM)-boundary element method (BEM) is proposed, where the XFEM is used for the bounded region where the scatterers are supposed to be located, and the BEM is used for the exterior domain. The inverse problem is formulated as a topology optimization problem, and solved by means of a heuristic algorithm based on the topological derivative and a level set representation of the scatterers.