Use $PKG_CONFIG variable instead of hardcoding pkg-config

This fixes cross-compilation.
Few changes to drop dependency towards X11