Appeals court upholds New York voting rights law, reversing lower court