S&P cuts Brazil credit rating to junk