Fixes for Haxe 3