Extension to cpm-es-cereal to help serialize glm types.