Revert back to manually detecting python flags

Using python-config comes with its own set of problems. Ick.

Reverts:
99db513e540f8e4f00578839371789568e8d656a
2d403eb3fdaeb0b5a15641b877d5ad87198e46d9