Fix serialization of objects with PHP5.3+ namespaces (RT#97863)