Cyril Ramaphosa is elected ANC leader