On FreeBSD, use -lthr instead of -pthread for now (see comments)