Fix unit tests when using ruby 1.8.7