fixes to enable building via node-gyp