C wrapper to libtorrent