South Africa beat Sri Lanka by 4 wickets in 2nd ODI