Add make & cmake building flags and C++ macros to make LevelDB optional