Porting ghc-mod to GHC 7.7

The GHC API has changed a bit.
This patch uses CPP so the code compiles and runs using both GHC 7.6 and 7.7.