Made the getgroups() code a little more portable. This will hopefully