New York declares state of emergency