FB 504, SetDeviceGammaRamp fails x64

On x64 SetDeviceGammaRamp fails about half the time due to an improper
sign extension bug in pyglet.  This fix should work 32/64 and will also
continue to work once pyglet fixes the bug.