New Zealand river granted legal rights