Haxe 3.1 migration (using latest nodejs)

Not sure what to do here re: haxelib.json. The latest version of nodejs from git is required in order to run on latest Haxe, but there isn't a new haxelib version for nodejs yet that incorporates those changes.

- [ ] @lpetre 
- [ ] @ogles Part of Haxe 3.1 migration