Quantum interference in atomic vapor controlled by a magnetic field