Adds workaround check for mox in to_primitive
Adds workaround check for mox in to_primitive

 * Works around bug 852095
 * Can be removed if a consistent mox 5.4 is released

Change-Id: I3e57b60886a94c5e7a337b73716759c9a6838e04

citrix-openstack-build/oslo.versionedobjects,openstack/oslo.versionedobjects