Crystal plasticity as an indicator of the viscous-brittle transition in magmas