Added support for browsers where property obj.consturctor.name isn't
supported.(IE was in that case)