Relation between Kitaev magnetism and structure in alpha-RuCl3