Lanka’s Dananjaya takes five to put New Zealand on back foot