Fix TypeError: object is not a function

Newer version of mathjs don't return a constructor function anymore, but a singleton.