Effect of phase transformations during synthesis on the chemical composition and structure of calcium-deficient hydroxyapatite