More Ruby 1.8.7 syntax fixes for compatibility