The Obscured Fraction of Active Galactic Nuclei in the XMM-COSMOS Survey: A Spectral Energy Distribution Perspective