diff --git a/modules/utils.js b/modules/utils.js
index <HASH>..<HASH> 100644
--- a/modules/utils.js
+++ b/modules/utils.js
@@ -52,7 +52,13 @@ function betterTypeOf(input) {
             return 'null';
         default:
         try {
-            return Object.prototype.toString.call(input).match(/^\[object\s(.*)\]$/)[1].toLowerCase();
+            var type = Object.prototype.toString.call(input).match(/^\[object\s(.*)\]$/)[1].toLowerCase();
+            if (type == 'object'
+                && phantom.casperEngine != "phantomjs"
+                && '__type' in input) {
+                type = input.__type;
+            }
+            return type;
         } catch (e) {
             return typeof input;
         }
Refs #<I>: fixes utils.betterTypeOf() for SlimerJS

In SlimerJS, the webpage object has no type 'qtruntimeobject' written
in the string form of the object. But it has a __type property.
The function should check this property when the engine is not PhantomJS.