Polymorphic transition of the flagellar polyhook from Escherichia coli and Salmonella typhimurium