Fix build errors on JDK 1.6.