Fix set-gid bit clearing under Linux when effective gid is different from file gid.