Fix tests for older versions of GHC