Python3: Fix for SWIG < 1.3.39 and Python 2

SWIG >= 1.3.39 should be used for Python 3