Fix when building with template-haskell-2.10.0.0

`template-haskell-2.10.0.0` provides instances for `Ord Lit` and `Lift Word8`, so only define those instances if using a version of `template-haskell` older than 2.10.0.0.