Replace hardcoded -llmdb with variable

and rename the variable to be consistent
with what we do for other libs