build: support dual-build with node-gyp and node-waf

Now newer versions of npm that include node-gyp will use that to build,
and older versions of npm will use node-waf to build.

Win-win!