build system improvements

Needs probably testing under other distros and windows.

"pkg-config" is the right cross-distro way to check for python-2.7 and later. The current hacks fail for gentoo and python-3.3 even.

Also, consistently use PKG_CONFIG since that is defined in pkg.m4 and used for other scripts as well such as cross-compiling stuff.