Distribution of internal energy in CO and CO2 vibrationally excited by a hot platinum surface