Don't reinterpret_cast to xccdf_item*, use the openscap API to do it