Make code compatible with Ruby 1.8.6 for deployment