Fix cfg syntax warnings in libnative
auto merge of #17799 : ebfe/rust/cfg_warn, r=alexcrichton

Probably fallen through the cracks in #17630.