Added support for browsers where property obj.consturctor.name isn't supported

In IE for example, the property obj.consturctor.name is undefined. I added an alternate way to retrieve the constructor's name in that case