Zn1-xMgxO nanoparticles prepared by the polymeric precursor method: Correlation between photoluminescence and local structure