I can't see any SJO-JFK or v.v. in the OW schedule, but I can see a (one directional) LGA-SJO stopping ("through") flight some days in the winter. I haven't looked exhaustively either, so if it's there, apologies.
I would also look at originating in ZRH as a possibility. Three or four hundred dollars more than originating in GIB, but in addition to saving potentially a lot in BA fuel charges (since AA can issue the ticket) it also saves two Europe coupons that could be used for other routes than shuttling to and from GIB.