Try to set CFLAGS=-fPIC to make libgit2/pygit2 happy