Update script to work on Ruby 1.8.*