Fix issue #9496, support customized host os