engines/ccgost: GOST fixes [from master].

Submitted by: Dmitry Belyavsky, Seguei Leontiev
PR: 2821