Fix errors on GHC 7.6