S&P ratings agency loses class action