Directly define String#try_convert and Hash#try_convert in ruby 1.8.