Fixed leveldb issues on non-static compilation