python: make it cross-compile

Patches and configure flags come from Buildroot.