A new optimization method for solving electromagnetic inverse scattering problems