Fix syntax on ruby 1.8.7
Merge pull request #24 from sathieu/ruby1.8-fixes

Fix syntax on ruby 1.8.7