Better macosx build

Fix SDK path and version detection