Fix Python 2.6 compatibility in cleanup_var_names

No dictionary comprehensions for you!