Generalized Krein algebras and asymptotics of Toeplitz determinants