Fix XML serialization for use with other ActiveModel implementations
than ActiveRecord (like ActiveResource).