Fix Windows 64 bit issues

In several places `Image` and `HWND` are stored as C `long`. While `Image` and `HWND` are 64 bit on Win64, C `long` is 32 bit. The SetWindowLong function is not 64 bit proof.
Patches are taken from <http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil>.