only use generics on supporting GHC