Fix compile failure on JDK 6