Fix html5 math/stem

See commit messages for details.