Two patches to make things behave on SmartOS