Fix mathml doctests

Fixes #8434.