Ukraine war exposes flaws within UN Security Council: South African president