South Africa says Putin agreed not to attend BRICS summit