Only use -fPIC when compiling the shared object.