Committed first pass at Solaris compatibility

TODO: Find somebody with a Solaris machine to test
2 files changed