Add temporary workaround for failing build on Ruby 1.8.7
Rubygems broke builds on Ruby 1.8.7:

travis-ci/travis-ci#1793
rubygems/rubygems#763

This patch is a temporary workaround until rubygems is updated.