Compatibility with ghc API >= 7.7
Added conditional CPP.
CPP corrections.
dep switch for convertible (#161).