Add code to work with -fPIC on systems that expect it