Detect postgresql better
Merge pull request #1669 from cmouse/use-pg_config-gpgsql

Use pg config gpgsql