Fix objects with integer property names

Objects usually have property names as strings. However, when an array
with integer keys is cast to object, PHP will create an object whose
property names are also integers. Support this nice corner case by
converting such properties back to strings.