Imidazole glycerol phosphate synthase; glutamine amidotransferase:cyclase that catalyzes the fifth step of histidine biosynthesis and also produces 5-aminoimidazole-4-carboxamide ribotide (AICAR), a purine precursor