GHC 7.8 fixes for TH version