Strip UTF-8 BOM when running under Ruby 1.8.

Fixes #427