Fix compatibility issues with Illumos.