use module.exports where available

Instead of always exporting `Tablesort` onto the window global, this patch exports onto `module.exports` under commonjs environments like [browserify](http://browserify.org). This way people who use browserify can just do `var Tablesort = require('tablesort')` after they do `npm install tablesort`.