Try to make LMDB code work on more platforms.