Fix references to childNode that should be firstChild.
Add test for mathjax/MathJax#824.