Fix for GHC 7.6 (broke with 7.8 patch)

My previous patch for GHC 7.8 actually broke it for 7.6 and earlier -- much apologies. I forgot that technically the `unsafePerformIO` in `System.IO.Unsafe` is a different function from the one in `Foreign`, because the one in `Foreign` is a wrapper that adds a deprecation warning, see http://hackage.haskell.org/package/base-4.6.0.0/docs/src/Foreign.html

This patch uses CPP to only use the newer location if on base 4.7 (which removed the one in `Foreign`).