Fixed a few issues such that math.js works on IE6-8 too.