An approximation scheme for a Hamilton-Jacobi equation defined on a network