posix: Fix getpwnam_r usage (BZ #1062)