An inverse scattering problem for electromagnetic waves