Synthesis and characterization of Mg-substituted hydroxyapatite nanopowders