Fixed Mac-QT wallet build and other issues

Please review before merging. This does not yet compile correctly for OSX 10.8/10.7, linker errors in leveldb. Working on resolving them.