configure: add fallback for ancient libssl versions that lack a .pc file
fix configure script to detect python more reliably

on FreeBSD, there's only a python-2.7 pkgconfig file.

thanks @nemysis for testing