Use cElementTree if available

Same code as used in Salt.