support for building lib as a node module