configure: Improve check for PostgreSQL's libpq.