Replaced hard-coded link flags with pkgconfig.