Internal electric field in (Cd,Mn)Te and (Cd,Mg)Te studied by the Pockels effect