Australia beat South Africa in 2nd ODI to keep series alive