Merge #14984: only import pwd on POSIX.