host checks from bitcoin upstream needed to cross-compile leveldb.
(OSX users must check if i didn't break anything)