Fix netcoind build warnings and errors