Electron and hole g-factors from magnetoluminescence in ZnTe and CdTe