Who negotiated with Yuan Shikai to prevent war?