Temperature-dependent free energy of crystallization and viscosity of glassy materials