Compile fixes for ghc 7.6.1