Infrared spectral analysis during the thermal decomposition of pure and irradiated crystalline NH4ClO4