[XDK] Add some workarounds for the UM/KM types mismatches.