Fix up case statement syntax for ruby 1.9 compatibility