Fix build issues with GHC 7.8