Using pkg-config to fix compiling in some cases