move instantiation of mathjax into javascript function, which is called after loading pod