Determination of the charge state of ions in thermospray mass spectra