jim.c: Simplify Jim_GetIndex() for int conversion

This approach avoids a coverity warning

Signed-off-by: Steve Bennett <steveb@workware.net.au>