Fixed the crash in gdimagecolorreplace with a 32-bit binding.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>