A reduction procedure for generalized Riemann problems with application to nonlinear transmission lines