Electronic spectra and symmetry of metalloporphyrins in low-temperature rare gas and nitrogen matrices