Fix postgresql build and add to qgis deps