Modified nanostructured hydroxyapatite coating to control the degradation of magnesium alloy AZ31 in simulated body fluid