The delivery out of captivity and delivery out of the hands of all other nations very clearly refers to the wars of independence, certainly including the war of 1812. The vision does not care to describe the political events of the wars, nor to be precise about them, but to discuss their most salient results - that there was a country delivered by the hand of God out of the control of all other nations. This is the description of the conditions of the United States when Joseph Smith is born.