Phase transitions of CO2 confined in nanometer pores as revealed by positronium annihilation