Electronic structure of thiaporphyrins: an X-ray photoelectron spectroscopic study