Magnetic-field effect on the phonon echoes in a rare-earth-doped glass