Fix https://github.com/joeferner/node-java/issues/143 (threading bug on Windows).
Fix https://github.com/joeferner/node-java/pull/150 breaking gyp on Windows.