New Zealand beat Australia by 24 runs, win ODI