Fix libtorrent 1.0.0 compilation. Closes #1659