more than likely the IACV... try taking it off and cleaning it out with carb cleaner...
however, it could be a matter of just a weak idle and when you had the A/C on, and the idle was jumped up to compensate, it was masking the problem.
Could just need a tune up.