Fixed #2: warning: variable $KCODE is no longer effective.

KCODE is being set only for Ruby 1.8.6/1.8.7.