Fix compilation under GHC 4.7+

Closes #1