Fix cfg syntax warnings in libnative

Probably fallen through the cracks in #17630.