Fixed compatibility with OpenJDK 6