Fix compiler warnings on %i format for long int.