Lattice dynamics and external magnetic-field effects in Ni-Fe-Ga alloys