AHC: Central American Canal before Suez

IOTL: The Suez canal was finished in 1869, and the Panama Canal in 1914.

Challenge: With a POD after 1789, have a canal across Central America/Southern Mexico occur prior to a Canal connecting the Mediterranean with the Red Sea.

I'm fairly loose which what are acceptable canals, Isthmus of Tehuantepec, ,Panama, or anywhere in between are all acceptable as well as canals connecting the Med with either the Gulf of Suez or the Gulf of Aqaba/Eilat.

(As an example: For Want of a Nail doesn't have Kramer Associates open the Guatemala Canal until 1878)
Th best way to get this is to have the Nicaragua Canal be supported more and get funding, though it still has the same problem that the Panam Canal had, that is tropical diseases killing the workers, something the Suez Canal did'nt have to worry about.
Was there a massive need prior to the Californian gold rush? I read Stephen E Ambrose's book about the Trans Continental Railroad and he describes the Panama portage in 1849 as a shambles.

However in the 1700s the Panama portage seems to have been a major route for the silver and gold of the Spanish treasure fleets and Porto Bello was attacked several times in the early 1700s.

So perhaps the decline of the Portage and it's requirement again later can be bought closer together so that building a canal seems like a wise move prior to the possibility of a Trans Continental Railroad. However there are massive technical problems compared to the Suez Cana, including the different hieghts of the Atalnatic and Pacific oceans and the range of mountains in Panama which won't just be dug up like the sand of the Sinai.