Distribution of ammonium in minerals of metamorphic and granitic rocks