Restore compatibility with JDK6