fix build failed on OpenJDK6.