when did new york became part of the united states