Fix not handling PGHOST environment for Unix domain socket connections

This bug was introduced in commit 06dfe7d1b4f023073f104a1424a079d146dbc201.