An ab initio study of the electron affinity of O2