Add compat/setenv.c, use in git.c.