fix various compiler errors/warnings

introduced with new beta releases of Xcode/Swift