some fixes for Ruby 1.9

- String#each is replaced w/ String#each_line
- dont use ::Config but ::RbConfig for Ruby 1.9