Fix warnings on XCode 10 and update to Swift 4.2
The library is converted and is now using Swift 4.2.
Fix warnings on XCode 10 and update to Swift 4.2