Structural-transition-driven antiferromagnetic to spin-glass transition in Cd–Mg–Tb 1/1 approximants