Generate object files for older versions of GHC

This works around [GHC bug #8942](https://ghc.haskell.org/trac/ghc/ticket/8942), for the versions of GHC which are affected by this bug.

Basically, ghci has been able to read .a files for a while, but under certain circumstances the .a file is read twice, causing ghci to exit with an error message. The workaround is to also generate .o files, like cabal 1.16 was doing.

Starting from GHC 7.8, ghci now requires .so files instead of .o or .a files. For those versions of GHC, the workaround is not needed, so we continue to skip .o files, like cabal 1.18 and above are doing.