Remove static linking and enable Leveldb compiling