Correlation of infrared spectra and phase transitions in annealed proton-exchanged MgO doped LiNbO3