file_types: Make code work in Python 2.4