The impact of atmospheric circulation on the chemistry of the hot Jupiter HD 209458b