Quantum Hall effect in CdTeCd1−xMgxTe heterostructures