Costco earnings hurt by credit-card switch