Fix compatibility with Python 2.6 (does not support the set syntax).