I removed linking pthread to the Lua53 port after my research suggested it was no longer needed. That was an erroneous action; the test I performed was not representative of how pthread is used in luaossl or cqueues. A bug was filed with a representative use case where the lack of pthread causes the test code to fail:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235158
This patch adds pthread as a port option. I copied one of the existing options.