Add -fPIC to CMAKE_CXX_FLAGS.