I learned the following from QI, Series G, episode "Geography."
In 1856, the US passed the Guano Islands Act, which stated that any American citizen, upon discovering any unclaimed island with a deposit of guano, is allowed to raise and flag and legally claim it in the name of his or her country. The exact quotation reads:
"Whenever any citizen of the United States discovers a deposit of guano on any island, rock, or key, not within the lawful jurisdiction of any other Government, and not occupied by the citizens of any other Government, and takes peaceable possession thereof, and occupies the same, such island, rock, or key may, at the discretion of the President, be considered as appertaining to the United States."
This is because guano, at the time, was a valuable fertilizer as well as a source of saltpeter (a component of gunpowder).
I just picture some naval officers getting off their ship to check out an unmapped island.
OFFICER: Captain! We have explored the island, sir.
CAPTAIN: And? How did you find it?
OFFICER: Excrementitious in the extreme, sir.
CAPTAIN: My God, man! What are you doing just standing here, then? Raise the flag! Quickly, before the French or British come by! This will mean a promotion for us both, Jenkins, you mark my words!
Yeah, I named the officer "Jenkins". Deal with it. It's a good sea-faring name.
The law also implies that the US would be allowed to claim the land, collect or use up all of the guano, and then give it up. They were under no obligation to keep their new property. However, they did end up keeping a lot of their new acquisitions obtained in this manner, including some islands in/near Hawaii.
This law as never been repealed. So feel free to sail the seas and conquer. FOR 'MERICA!