Finite temperature effects on the X-ray absorption spectra of lithium compounds: First-principles interpretation of X-ray Raman measurements