Temperature dependence of CO2 and N2 core-electron excitation spectra at high pressure