The former New Zealand Test captain will retire from international cricket as the Kiwis' leading wicket-taker of all time.