Making GPIO module compatible with Python 2