XPS study of surface segregation in NiMg alloy films