[M] Change in libosmocore[master]: libosmogsm: Factor out the C2 derivation function