Fix rails2/3 detection