Support Python 2 as well as Python 3