Add node.js module compat, and tests