The effect of crystallization on the rheology and dynamics of lava flows