Fix build errors on GHC 7.4.2