Fixes for illumos/SmartOS