getgroups: fix compilation when getgroups is available