S&P downgrades China's credit ratings