Added support for using from nodejs.