improve python build portability