A strong earthquake has hit near New Zealand's North Island.