Make pkg. play nice with npm Commonjs style import

This is based on a segestion from
http://requirejs.org/docs/node.html