UndecidableInstances fix for ghc < 7.7.