Build C sources with -fPIC when GHC is using dynamic libraries.

Fixes #2207.