fix a type conversion issue of slideIndex

While type 'int' in C still occupies 32 bits (64 bit platform, compiled
using Visual C++ compiler 2013), 64 bits is used for type 'int' in Go.
This leads to the misconversion if the value is originally negative.

For example: -1 is 11111111(hex) in int32. When it cross the border from
C to Go, if we uncarefully convert the value to int64 (what we wrote
'int' in 64 bit version of Go), zeros will be filled before the value,
which becomes 0000000011111111. The negative value becomes positive now.