prepare as node module (and fix build script)