Cartan determinants for gentle algebras