Redo some of the patches from the previous change set (PR pkg/56645) so
that they reflect the upstream project's method for including its
version of portable_utime(), rather than what was done previously,
which broke non-BSD builds, e.g., on Solaris derivates:
ld: fatal: symbol 'portable_utime' is multiply-defined:
(file .libs/osdep.o type=FUNC; file .libs/utime.o type=FUNC);
ld: fatal: file processing errors. No output written to .libs/libc-client.so.5.0.0
Compile tested on NetBSD 9.2_STABLE, NetBSD 9.99.93, OmniOS r151038,
and Fedora Linux 34.