Add a workaround for old Boost version that have not the async_connect function.