Incorporation of Mg in GaN grown by molecular beam epitaxy