Make it work as node.js module