lib/replace: check if we have dirfd()