OSX build: Fix architecture detection