Reconstruction of the parameters of the Debye and Lorentzian dispersive media using the genetic algorithm