Electron affinities of CO2, OCS, and CS2