The president warned about nationalism and protectionism and said South Africa would not change its values or policies