Use reentrant getpwuid_r() to avoid possibe crash in set_groups()

Fixes bug #518.