Revert "haxe3 fixes (breaks haxe2)"

This reverts commit d754865702ce9f3c31496e23308fe4e6f1356818.