which river forms part of the border between the state of new york and canada?