Calculation of core‐level electron spectra of ionic liquids