Make sure the port links against libthr.so
This fixes the build in HEAD after lld received support for
--no-allow-shlib-undefined in base r345349.
Upstream looks for libpthread in sem_init(3), which is part of libc on
FreeBSD. Look for a symbol that's in libpthread to make sure we link
against it.
See also: https://github.com/tesseract-ocr/tesseract/issues/2344
PR: 236812
Approved by: Piotr Kubaj <pkubaj@anongoth.pl> (maintainer)