Mac build fixes

Here are my fixes to compile and run Mac client.

Also requires building leveldb for mac: from ```src/leveldb``` folder: ```make libleveldb.a libmemenv.a```

Binaries: https://s3.amazonaws.com/captemulation/dmg/PI-Qt.dmg