Use python-config for libs when available

https://bugzilla.gnome.org/show_bug.cgi?id=734289