fs-util: prefer glibc's fchmodat() if possible
Since v2.39 glibc's fchmodat() will call into the kernel's fchmodat2()
if flags are passed:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=
65341f7bbea824d2ff9d37db15d8be162df42bd3;hp=
c52c2c32db15aba8bbe1a0b4d3235f97d9c1a525
On older versions, if the flag is anything other than AT_SYMLINK_NOFOLLOW,
it returns EINVAL, so we can detect it and call the kernel syscall directly
ourselves.
Using the glibc wrappers when possible is prefereable so that programs
like fakeroot can intercept its calls and redirect them.
Follow-up for
adecfb3bc0be0def49433277fcad5333893756cc