Improved GHC 7.4 compatibility.
Now compiles at least as far back as GHC 6.12, but will only really work on GHC 7.4 and above.