Add -fPIC flag for shared-library use