Make compatible with CommonJS
Merge pull request #47 from creynders/fix_47

Make compatible with CommonJS