Ruby 1.8.7 compatibility

These changes work with ruby-1.8.7, specifically to support using this cookbook with AWS OpsWorks.