diff --git a/Hledger/Cli/Utils.hs b/Hledger/Cli/Utils.hs
--- a/Hledger/Cli/Utils.hs
+++ b/Hledger/Cli/Utils.hs
@@ -34,7 +34,18 @@
 import System.Time (ClockTime, getClockTime, diffClockTimes, TimeDiff(TimeDiff))
 import Test.HUnit
 import Text.Printf
+
+-- kludge - adapt to whichever directory version is installed, or when
+-- cabal macros aren't available, assume the new directory
+#ifdef MIN_VERSION_directory
 #if MIN_VERSION_directory(1,2,0)
+#define directory_1_2
+#endif
+#else
+#define directory_1_2
+#endif
+
+#ifdef directory_1_2
 import System.Time (ClockTime(TOD))
 import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds)
 #endif
@@ -103,7 +114,7 @@
 fileModificationTime f
     | null f = getClockTime
     | otherwise = (do
-#if MIN_VERSION_directory(1,2,0)
+#ifdef directory_1_2
         utc <- getModificationTime f
         let nom = utcTimeToPOSIXSeconds utc
         let clo = TOD (read $ takeWhile (`elem` "0123456789") $ show nom) 0 -- XXX read
diff --git a/hledger.cabal b/hledger.cabal
--- a/hledger.cabal
+++ b/hledger.cabal
@@ -1,6 +1,6 @@
 name:           hledger
 -- also in cpp-options below
-version: 0.21.2
+version: 0.21.3
 category:       Finance
 synopsis:       The main command-line interface for the hledger accounting tool.
 description:
@@ -41,7 +41,7 @@
     Default:       True
 
 library
-  cpp-options:    -DVERSION="0.21.2"
+  cpp-options:    -DVERSION="0.21.3"
   ghc-options:    -W
   -- should be the same as below
   exposed-modules:
@@ -62,7 +62,7 @@
                   Hledger.Cli.Stats
   -- should be the same as below
   build-depends:
-                  hledger-lib == 0.21.2
+                  hledger-lib == 0.21.3
                  ,base >= 4.3 && < 5
                  -- ,cabal-file-th
                  ,containers
@@ -111,13 +111,13 @@
                   Hledger.Cli.Print
                   Hledger.Cli.Register
                   Hledger.Cli.Stats
-  cpp-options:    -DVERSION="0.21.2"
+  cpp-options:    -DVERSION="0.21.3"
   ghc-options:    -W
   if flag(threaded)
        ghc-options:   -threaded
  -- should be the same as above
   build-depends:
-                  hledger-lib == 0.21.2
+                  hledger-lib == 0.21.3
                  ,base >= 4.3 && < 5
                  ,containers
                  ,cmdargs >= 0.10 && < 0.11
