compatability with ghc 7.6.3 and 7.8