Theoretical study of the vertical electronic spectrum of O2: Mixing of valence and Rydberg states