Do not check for ruby/encoding.h, if we are running under Ruby 1.8.7

Prevents /usr/include/ruby/encoding.h from being incorrectly detected when compiling under Ruby 1.8.7.