Problems linking against pthreads in bin/tests/optional
Jenkins builds have started to fail when building files in bin/test/optional, apparently unable to link to the pthreads library. The cause appears to be a missing "-lpthreads" somewhere in the build scripts. The failure occurs on multiple systems, including Ubuntu 16.04 and FreeBSD 11.