Fix "Redeclaration with no linkage" on SmartOS
Use Solaris Threads on Solaris
Merge pull request #15 from enmand/master

Fixes for illumos/SmartOS