The viscous damping of gravity waves in shallow water