         
         // register methods
         registerNativeMethods()
+        loadJavascriptSource("timers")
+        
+        // Quick fix for iOS8: polyfill for ios8
+        if #available(iOS 10, *) {
+            context.evaluateScript("Promise = undefined")
+            loadJavascriptSource("/bower_components/es6-promise/es6-promise")
+        } else if #available(iOS 9, *) {
+            loadJavascriptSource("/bower_components/es6-promise/es6-promise")
+        } else {
+            loadJavascriptSource("/bower_components/es6-promise/es6-promise")
+            loadJavascriptSource("/bower_components/core.js/client/core")
+        }
         
         
         // set up System global for module import

    }

    private func registerLoadSubscriptMethod() {
        let loadSubscript: @convention(block) String -> () = { subscriptName in
            self.loadJavascriptSource("/modules\(subscriptName)")
        }
        context.setObject(unsafeBitCast(loadSubscript, AnyObject.self), forKeyedSubscript: "loadSubScript")

        let (sourceName, directory) = getSourceMetaData(sourcePath)
        if let path = NSBundle.mainBundle().pathForResource(sourceName, ofType: "js", inDirectory: directory), script = try? NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding) as String {
            context.evaluateScript(script);
        } else {
            print("Script not found: \(sourcePath)")
        }
    }
    
