TS-3066 Fix various build issues for OmniOS, broken since 5.0.x.