Fix compile errors on Illumos