build: add a second fallback for leveldb

On older versions of Ubuntu (like 12.04, which Travis is using), there
is no shared library for LevelDB and static libraries don't
automatically pull in dependencies.