mgetgroups: avoid argument promotion issues with -1