Are you sure it is the AC compressor doing the rattling? It could also be one of the other pulleys on the serpentine belt system.
It could also be the harmonic balancer, as they age they can start rattling especially when the belt system is under load by the AC compressor.
When the AC compressor clutch is engaged, it can put additional tension on some of the other pulleys.
A bad one way alternator override pulley can also aservate the other pulleys causing noise issues especially at engine idle.
You may want to invest in a mechanics stethoscope so you can pinpoint the exact location where the rattle is emanating from.
They are not that expensive and are very helpful when trying to pinpoint exact locations of noises around the engine compartment.
_________________
Supporting Vendor and Moderator of LOST05 Jeep Liberty CRD Limited
Ironman Springs/Bilstein/Shocks
Yeti StgIV Hot Tune
Week's BatteryTray
No FCV/EGR
Samcos/ProVent
SunCoast/Transgo
Carter Intank-pmp
2mic.Sec.Fuel Filter
Flowmaster/NO CAT
V6Airbox/noVH
GM11 Bld.fan/HDClutch
IronrockArms/wwdieselMount98 Dodge Cummins 24 Valve