better support for usage as a node module