gh-36210: configure.ac: disable mathjax with --disable-doc
Our mathjax package is used only to build the sphinx documentation that
can be disabled with `--disable-doc`. It therefore makes sense to
disable the mathjax package along with the other dependencies pruned by
`--disable-doc`.
URL: https://github.com/sagemath/sage/pull/36210
Reported by: Michael Orlitzky
Reviewer(s): Kwankyu Lee