Rietveld-refinement study of aluminium and gallium nitrides