Commonjs compatibility

So filters.js can be used with NodeJS, in combination with https://github.com/Automattic/node-canvas