Fixes #26 - Support Solaris/BSD (simple change needed)

Adds the suggested code for SunOS support. Tests pass. Also still pass on linux.