Phase transitions of the ferroelectric (ND4)2F2Cl5D2O under a magnetic field