HADOOP-10989. Work around buggy getgrouplist() implementations on Linux that return 0 on failure. Contributed by Chris Nauroth.