Apply Safe Haskell flag for newer GHCs only.