New Zealand beat Pakistan in 3rd ODI to clinch series