Fixed compilation issues with weird string.h implementations

Compilation issue on some CentOS system: deprecated BSD crap index( )
function in string.h shadowed by local variables. Renamed the variables.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>