Restore compatibility with Sun JDK