what river forms a border between new york and canada?