fix compile errors on older versions of Cabal