Support as a CommonJS module

Hi,

Just a minor modification to allow the module to be included in CommonJS environments (e.g. Browserify).

Thanks,
Brendon.