Use template haskell to fix the call to withTempDirectory in Setup.hs so that it works with Cabal 1.17