Add support for getting pkgDeps with Cabal <= 1.16

This should fix most of the test failures but now I'm getting `uncaught exception: GhcException (<command line>: cannot satisfy -package-id doctest-0.9.11-5aad53482974c7b3bac45e6c2907cddd`, not sure what's up with that.