Viscosity solutions to an initial value problem for a Hamilton–Jacobi equation with a degenerate Hamiltonian occurring in the dynamics of peakons