Fixed segfault error on OSX, re-added makefile for leveldb