SmartOS Fixes

This adds code to IFE to be compatible with SmartOS, some contributions by @face and others by @rogerhub and myself