Work around sun-java6 generics issues