The BRST complex and the cohomology of compact lie algebras