Only apply the UTF-8 BOM stripping in Ruby 1.8.

Something goes wrong when we execute this BOM-stripping code in
Ruby 1.8 which has encodings support.  Didn't care to digg into this,
and so I'm just limiting this fix to Ruby 1.8 where it's actually
needed.