Inverse scattering problem for the wave equation with discontinuous wavespeed