Unions endorse Sanders, Clinton for president as NY race nears