A Canadian law quietly turned generations of upstate New Yorkers into dual citizens