Improved method for finding PostgreSQL libraries in configure script.