Fix osg/pq related build issues.