Fix openjdk6 compilation error with generics