Taylor's counter-attacking century bails out Kiwis