diff --git a/Data/FileEmbed.hs b/Data/FileEmbed.hs
--- a/Data/FileEmbed.hs
+++ b/Data/FileEmbed.hs
@@ -1,20 +1,29 @@
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE CPP #-}
 module Data.FileEmbed
     ( -- * Embed at compile time
       embedFile
     , embedDir
     , getDir
       -- * Inject into an executable
+#if MIN_VERSION_template_haskell(2,5,0)
     , dummySpace
+#endif
     , inject
     , injectFile
     ) where
 
-import Language.Haskell.TH (runQ,
-                            Exp (AppE, ListE, LitE, TupE),
-                            Lit (StringL, StringPrimL, IntegerL),
-                            Q,
-                            runIO)
+import Language.Haskell.TH.Syntax
+    ( runQ
+    , Exp (AppE, ListE, LitE, TupE)
+#if MIN_VERSION_template_haskell(2,5,0)
+    , Lit (StringL, StringPrimL, IntegerL)
+#else
+    , Lit (StringL, IntegerL)
+#endif
+    , Q
+    , runIO
+    )
 import System.Directory (doesDirectoryExist, doesFileExist,
                          getDirectoryContents)
 import Control.Monad (filterM)
@@ -57,7 +66,7 @@
 
 bsToExp :: B.ByteString -> Q Exp
 bsToExp bs = do
-    helper <- runQ [| stringToBs |]
+    helper <- [| stringToBs |]
     let chars = B8.unpack bs
     return $! AppE helper $! LitE $! StringL chars
 
@@ -101,6 +110,7 @@
     let s = show i
      in replicate (sizeLen - length s) '0' ++ s
 
+#if MIN_VERSION_template_haskell(2,5,0)
 dummySpace :: Int -> Q Exp
 dummySpace space = do
     let size = padSize space
@@ -111,6 +121,7 @@
     pack <- [|unsafePackAddressLen|]
     getInner' <- [|getInner|]
     return $ getInner' `AppE` (upi `AppE` (pack `AppE` len `AppE` chars))
+#endif
 
 inject :: B.ByteString -- ^ bs to inject
        -> B.ByteString -- ^ original BS containing dummy
diff --git a/file-embed.cabal b/file-embed.cabal
--- a/file-embed.cabal
+++ b/file-embed.cabal
@@ -1,5 +1,5 @@
 name:            file-embed
-version:         0.0.4
+version:         0.0.4.1
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
