update AMI build script with ruby 1.9

Review 880 by @mlucy