Migrate from node-waf to node-gyp and fix streams.