Screening effects in the Ti 2p core level spectra of Ti-based ternary nitrides