fixed linking and detection issues for PostgreSQL on Ubutnu 12.04