Made compatible with 1.8.x by requiring rubygems