Add FreeBSD linker options to configuration.

The FreeBSD multithreading library is named `-lthr`, not `-lthread`.
The default expected `-lthread` will fail on FreeBSD.