 
 import Foundation
 
+// This is used because in Swift 1.1, turning on -O causes a
+// memory access violation in SocketEngine#parseEngineMessage
+private var fixSwift:AnyObject?
+
 extension String {
     private var length:Int {
         return Array(self).count

                }
                
                if msg.length != 0 {
                    self.parseEngineMessage(msg)
                }
                
                i += n

        
        if type != PacketType.MESSAGE.rawValue {
            // TODO Handle other packets
            if messageString.hasPrefix("b4") {
                // binary in base64 string
                messageString.removeRange(Range<String.Index>(start: messageString.startIndex,
                    end: advance(messageString.startIndex, 2)))
                
                if let data = NSData(base64EncodedString: messageString,
                    options: NSDataBase64DecodingOptions.IgnoreUnknownCharacters) {
                        self.client.parseSocketMessage(data)
                }
