Fixed pervasive SIGBUS errors on OSX by using the local
implementation of getopt instead of the included version.
Avoid using multi-arch compile options for python on OSX.