Ultralow-frequency variations of the magnetic field during the propagation of acoustic-gravitaty waves in the ionosphere