replaced getgrgid with thread safe getgrgid_r