Upgrade code to work with ghc 7.6.