fix issues when compiling without pkg-config

This fixes compilation problems when pkg-config is not available, at least on my mac