New York City declares state of emergency