William Jay Gaynor, mayor of New York