Fixes to make SVG and MathML elements work properly