fix compile errors on older versions of Cabal

`cabal2nix` builds on all versions listed in `release.nix` (I didn't test `ghcHEAD` because I don't have the time to build HEAD)).