make java bindings build with less patching