CEPA calculations on open-shell molecules. II. Singlet-triplet energy splitting in π2 configurations of diatomic molecules