diff --git a/Data/UnixTime/Types.hsc b/Data/UnixTime/Types.hsc
--- a/Data/UnixTime/Types.hsc
+++ b/Data/UnixTime/Types.hsc
@@ -6,7 +6,9 @@
 import Data.Int
 import Foreign.C.Types
 import Foreign.Storable
+#if __GLASGOW_HASKELL__ >= 704
 import Data.Binary
+#endif
 
 #include <sys/time.h>
 
@@ -31,11 +33,13 @@
             (#poke struct timeval, tv_sec)  ptr (utSeconds ut)
             (#poke struct timeval, tv_usec) ptr (utMicroSeconds ut)
 
+#if __GLASGOW_HASKELL__ >= 704
 instance Binary UnixTime where
         put (UnixTime (CTime sec) msec) = do
             put sec
             put msec
         get = UnixTime <$> (CTime `fmap` get) <*> get
+#endif
 
 -- |
 -- Format of the strptime()/strftime() style.
diff --git a/unix-time.cabal b/unix-time.cabal
--- a/unix-time.cabal
+++ b/unix-time.cabal
@@ -1,5 +1,5 @@
 Name:                   unix-time
-Version:                0.3.0
+Version:                0.3.1
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
@@ -15,6 +15,7 @@
 Library
   Default-Language:     Haskell2010
   GHC-Options:          -Wall
+  CC-Options:           -fPIC
   Exposed-Modules:      Data.UnixTime
   Other-Modules:        Data.UnixTime.Conv
                         Data.UnixTime.Diff
