The options as per the *A time table:
http://www.staralliance.com/flightSe...archbutton.y=8
The option via YYZ is not so good as you arrive in YYZ late at night and the flight to SJO is only in the morning. The 763 might be the old C product. Check the AC forum for details on how to spot the old config.
The AC product to SJO however is far superior to the US product. The US transatlantic C product is horrid. Don't even think about it.
If you have the time, I would advise you to fly to YYZ using LH (good seats) or OS (great food, new seats), take a days break on the outbound in YYZ and fly to SJO with AC.
On the way back take the AC999/AC858 combo that takes you home in under 15 h. If you miss your connect in YYZ, AC will put you into an airport hotel
Avoid US/UA on long haul and perhaps stopping in a US city at all.