Fixed dependencies for Ruby 1.8.7

Some dep changes from master needed in stable/3.x