SmartOS package compile fixes

I've started using Nix on SmartOS again. Here's some stuff I fixed along the way.