Dynamic cast of libtorrent alert types.