On the numerical calculation of polylogarithms