Fixes for compilation with GHC 7.6.