compatibility changes for GHC 7.8