What nation that had signed a nonaggression pact with Germany eventually joined the Allies?