I Dont think you should just hook it up to a hot wire. The green wire is switched. If you hook it up hot the compressor will run all the time.
If i rember rightThe green wire runs from the AC controll in the dash to a relay then to the press cutof switch on the reciver /drier. then to the compressor.
Not sure about the exact location in a 87 but there is a connector in the wireing harness behind the air cleaner on the firewall on the later model blazers,should be grey or black. Is that where the loose wire is? if so just wire it back in. The only other place i can think of where it may have broke loose from is the pressure switch on the drier.