Fix issue #29: switch to M mode on mathshift.