Make version-appropriate Foldable imports

foldl' and foldr' moved into the Foldable class, then toList.
This gets rid of a warning about the imports.