Add an explicit check for the toString function for compatibility with IE <object> elements.

Patch by: bobv
Review by: scottb


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1655 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Cast.java b/dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Cast.java
index 2ae869d..f9c60d1 100644
--- a/dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Cast.java
+++ b/dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Cast.java
@@ -151,12 +151,12 @@
     // jso's typeId is undefined, because (undefined < positive int).
 
     if (jso && !(jso.@java.lang.Object::typeId >= _.@java.lang.Object::typeId)) {
-      // don't clobber toString
-      var oldToString = jso.toString;
       for (var i in _) {
-        jso[i] = _[i];
+        // don't clobber toString
+        if (i != 'toString' ) {
+          jso[i] = _[i];
+        }
       }
-      jso.toString = oldToString;
     }
     return jso;
   }-*/;