Fix syntax to be compatible with ruby 1.9

Colon is no longer allowed after if / unless in ruby 1.9.