fixed compile error on FreeBSD
FreeBSD doesn't use #define for pthread constants