fix swift for linux
Merge pull request #829 from LipuFei/fix_swift

fix swift for linux