Formation of long-lived CO2+ via photoionization of CO+