Replace hardcoded -llmdb with variable

and rename the variable to be consistent
with what we do for other libs
Merge pull request #1768 from rubenk/fixup-lmdb

Replace hardcoded -llmdb with variable