Pakistan hold advantage in second test v NZ