Redmine #6138: Fix configure.ac to use -lpthread during LMDB detection (...

...for systems not using builtin pthread library)

Ticket: https://dev.cfengine.com/issues/6138