Double check your PCV valve, hose and any other vacuum hoses that you may have disturbed, an air leak if big enough will cause the car to stall, to help locate the leak VERY VERY carefully and VERY sparingly spray starting fluid in short bursts around the vacuum lines, any leak found will result in the engine RPMs going up briefly. The other thing it could be is a faulty/plugged IAC valve, this controls your idle RPM, when you turn on the AC the computer should tell the IAC to open more to raise the idle due to the load of the AC, if its not working then your idle will not bump up and the car will threaten to stall.
1997 Mazda 323 1.3L 5-speed (130,000km)
2006 Mazda3 1.6L 5-speed (40,150km)
1989 Ford F250 7.3L IDI non-wastegated turbo 5-speed
239,000 miles and counting, ORIGINAL CLUTCH, still going strong. (In USA, dont have it here in AT)
If I talk in this color it means I am speaking to you as a moderator, pay attention.