python: fix mac support