New Zealand’s prime minister has said she and other ministers will take a 20% pay cut lasting six months.