Restore JDK 6 compatibility