Fix tests in ruby 1.8