fix build errors.
add custom datadir option.
updated libbitcoind.so.
datadir fixes. wait for wallet to load.