Perhaps a US that fails to gain the Louisiana purchase and has its expansion cut off at the Mississippi turns inward and becomes more mercantile, subsequently going overseas and then into Africa seeking markets for it's products and in order to obtain raw resources.(Like most of the OTL European colonizers)
A longer lasting Federalist party/movement would probably help achieve this by making the government slightly less set on inward expansion and a bit more interested in expanding America's trade networks and industry.
The loss of the Louisiana purchase is crucial IMO because as long as the US has an unobstructed path past the Mississippi, it will be busy expanding west at least until the 1870s regardless of the result of the Mexican-American war. Remember, there is still the oregon country/pacific northwest and the high plains even in the event of a failed Mexican war.
Also preventing Jefferson's presidency might be a good start. Trouble is that you need to basically bury the Louisiana purchase before it gets off the ground as once it's on the table it will likely be made.
In conclusion, a substantial American presence in Africa requires an early halt to westward expansion and that requires that the US never gets past Mississippi.
Agreed, the western expansion will take up too much of America's attention for it to pay too much attention to Africa.