Update for haxe 3
haxe3 fixes forgot to commit a while back, and changes for new haxelib.