use npm's node-gyp to avoid needing global install
minor c++ build fixes
better handling of integer types
remove non-lazy approach - solves #40