some fixes for libtorrent build