Support LMDB in the CMake build system

Otherwise, cmake can't build.