Fixes for ubuntu 14.04

Now it works in later versions of ubuntu. Although, it doesn't build later versions of bitcoind, probably because of new building workflow. ( ./autogen.sh; ./configure; make )