Scattering of ultrasonic waves by heterogeneous interfaces: Formulating the direct scattering problem as a least-squares problem