Restore Java 6 compatibility