Hundreds of whales beached on New Zealand islands