Fix compilation with libtorrent 1.x.x.
Fix compilation with libtorrent 1.x.x v2
Merge pull request #636 from sledgehammer999/libtorrent_trunk

Fix compilation with libtorrent 1.x.x.