Fix gimbal lock discontinuity in Quaternion->Euler conversion process