Fixes for GHC 7.4