diff --git a/texmath.cabal b/texmath.cabal
--- a/texmath.cabal
+++ b/texmath.cabal
@@ -1,5 +1,5 @@
 Name:                texmath
-Version:             0.3.0.1
+Version:             0.3.0.2
 Cabal-version:       >= 1.2
 Build-type:          Custom
 Synopsis:            Conversion of LaTeX math formulas to MathML.
@@ -63,13 +63,19 @@
       Build-depends: base >= 3 && < 4
     Exposed-modules:     Text.TeXMath, Text.TeXMath.Parser, Text.TeXMath.MathMLWriter
 
-    Ghc-Options:         -Wall -fno-warn-unused-do-bind
-    Ghc-Prof-Options:    -auto-all
+    if impl(ghc >= 6.12)
+      Ghc-Options:     -Wall -fno-warn-unused-do-bind
+    else
+      Ghc-Options:     -Wall
+    Ghc-Prof-Options:  -auto-all -caf-all
 
 Executable testTeXMathML
     Main-is:             testTeXMathML.hs
-    Ghc-Options:         -Wall -fno-warn-unused-do-bind
-    Ghc-Prof-Options:    -auto-all
+    if impl(ghc >= 6.12)
+      Ghc-Options:     -Wall -fno-warn-unused-do-bind
+    else
+      Ghc-Options:     -Wall
+    Ghc-Prof-Options:  -auto-all -caf-all
     if flag(test)
       Buildable:         True
     else
@@ -77,11 +83,13 @@
 
 Executable texmath-cgi
     Main-is:             cgi/texmath-cgi.hs
-    Build-depends:       utf8-string
-    Ghc-Options:         -Wall -fno-warn-unused-do-bind
-    Ghc-Prof-Options:    -auto-all
+    if impl(ghc >= 6.12)
+      Ghc-Options:     -Wall -fno-warn-unused-do-bind
+    else
+      Ghc-Options:     -Wall
+    Ghc-Prof-Options:  -auto-all -caf-all
     if flag(cgi)
       Buildable:         True
-      Build-depends:     cgi, json
+      Build-depends:     cgi, json, utf8-string
     else
       Buildable:         False
