Fix build of java bindings on mingw