Support for solaris/smartos

It's a dirty fix.