Compilation with GHC 7.8.2

Changes to allow building with the latest GHC. Compiles successfully on both Windows and Ubuntu with GHC 7.8.2 and works fine with EclipseFP as far as I can tell (I never used either before).