fixed compile error on FreeBSD
FreeBSD doesn't use #define for pthread constants
Merge pull request #263 from chibisuke/master

Fixed #261 compile error on FreeBSD