Reversible structural phase transition in Ni-Mn-Ga alloys in a magnetic field