Support LMDB in the CMake build system

Otherwise, CMake can't build.