X-ray spectroscopy and electronic structure of MoO2