Use python-config to get cflags and ldflags.