USA beat Mexico 2-0 to secure their place at next year's World Cup while Costa Rica also qualified thanks to a 1-1 draw with Jamaica.