Optical pumping of electrons in Hg1-xCdxTe and Hg1-xMnxTe alloys