osx/ios build fixes & adding arm64 support