fixed build script to support RubyGems >= 1.8.26