Aligns behavior of Object.prototype.toString more closely to spec. Fixes #302, #196.