Fixes for Haxe Java target