Smoothing constrained generalized linear models with an application to the Lee-Carter model