Fix compilation on Mac and use pkgconfig to get info.