GRIM: Fix matrix to quaternion conversion. Fixes #1132
Merge pull request #1133 from Akz-/quat-fix

GRIM: Fix matrix to quaternion conversion. Fixes #1132