A man has died after being attacked by a shark off the coast of a remote island to the east of New Zealand.