Mg doping studies of electron cyclotron resonance molecular beam epitaxy of GaN thin films