fix build with java binding