Haxe3 compatibility fixes