Fixes to java bindings build