Fix build on SmartOS