support compiling with ghc

also support builds with base 4.5 (7.6.3)