Small syntax fixes to support ruby 1.8