python-curl: rewrite to fix cross build