Solaris compatibility
Merge pull request #17 from Freeaqingme/master

Solaris compatibility