New York State reaches agreement to legalize recreational marijuana