Enhanced and stable green emission of ZnO nanoparticles by surface segregation of Mg