LevelDB on OS X corruption bug

See http://hackingdistributed.com/2013/11/27/bitcoin-leveldb/ for details on this, patch taken directly from https://github.com/rescrv/StockLevelDB/commit/2a7e84a4bef118be3c3e8253ffbc6279b9ab54da but I would expect this to be a temporary fix until Sanjay et. al. come up with something they are more happy with. Follow discussion here: https://groups.google.com/forum/#!topic/leveldb/GXhx8YvFiig

This is the cause of https://github.com/dominictarr/npmd/issues/10

Proposed for a leveldown@0.10.2 release but I wouldn't mind an OSX user to actually test that this compiles and the tests complete.