Compensation mechanism in MOCVD and MBE grown GaN : Mg