McCleary's second goal of the tournament set up a quarter-final clash against Haiti.
El Salvador could have clinched a berth to the quarter-finals with a win but could not score.
The Jamaicans prevailed despite needing three goal keepers and lost Darren Mattocks to a second yellow card in the 81st minute.
Starting goalkeeper Jermaine Taylor was injured in the opening minutes, while replacement Dwayne Miller went down in the 23rd minute after taking a hit in the head.
In the late match, Canada continued their offensive struggles in front of a partisan crowd in Toronto.
Canada had a great chance to end that drought in the 24th minute when Dejan Jakovic's throw-in set up an attempt by Marcus Haber that was saved.
The Canadians failed to score in their three games at the tournament, allowing Costa Rica to advance to the quarter-finals with just three points.
(Writing by Jahmal Corner in Los Angeles; Editing by Greg Stutchbury)
Share
