COOK-3490 Fixes pg gem install for v9.2 on RHEL 6

I've not been able to test (yet) whether this works in other
environments. I imagine that the issue is not restricted to postgresql
9.2 but that is the only version I have tested. It definitely works for
my environment and seems to be in the spirit of the existing code.