Instead of war with Ottomans and Barbarys, cooperation and trade
I have another idea. The United States from 1789 to 1814 was something of a pariah as far as European nations was concerned. Britain, France, Spain, all of the European powers were reluctant to diplomatically recognize the new United States or trade with it because they feared that the Republican virus would be catching (Republican France became an exception after 1780). On the other hand, the Barbary States routinely took captives--more white captives than they could ransom. And after 1782, the United States increasingly needed a market for it's cotton and wanted African slaves--which the Ottoman Empire and the Barbary States had for sale.
What if--instead of fighting the Barbary States, the United States cut a deal with them?
Instead of paying the usual tribute, the US could permit the Barbary States to sell it's white captives as bond servants and Africans as slaves in US ports. With guaranteed freedom of religion, Algerines and Moroccans and Ottomans and Egyptians would have no problem building mosques in American port cities. And having a base in the New World would enable the Barbary Corsairs to raid Spanish and Portuguese and British ports in the New World, meanwhile providing a market for US munitions makers and ship builders. And cotton growers. The Ottoman Empire consumed a great deal of cotton and had a much larger market for it than it could grow. The Ottomans could be a critical market for the Americans at a time when they were being shunned and embargoed by Europe, especially with China so far away. Who knows? The Ottomans might even be able to market naptha from rock oil (probably mostly from Albania rather than Iraq) for American lamps, competing with whale oil, as well.
The Ottoman Empire would be too far away for the US to engage in any full scale war with it during the early 1800s. But as a trading partner, leading to large scale settlement of Greeks, Lebanese, Slavs, Armenians and Jews as bonded servants in the South and Egyptian Copts as well as Ethiopians as slaves, along with free Muslim settlers throughout Eastern cities, this could be a major departure for the US.
The transportation of bonded servants rather than slaves could continue after 1808, since it apparently did at least into the 1830s OTL. And the US might act to protect Algeria from French invasion in the 1830s and Morocco later on.