Make findall generic for all versions of Python