python: silence macro redefinition warnings

Python defines _XOPEN_SOURCE and _POSIX_C_SOURCE unconditionally.  On Linux,
this is problematic as glibc's features.h defines these values if _GNU_SOURCE is
defined to the value that is currently implemented.  Python defines it to the
versions that it requires, which may be different.  Undefine the macros on Linux
(technically, this should be safe to do globally) before including the python
headers.