Python3 fixes in _window_sdl2.pyx

This seems to be a necessary change for python3 to work, and it seems to be correct for python2 as well, but I'm not sure about it...can someone confirm?