X-ray absorption spectroscopy study of NicMg1-cO solid solutions on the Ni K edge