Add support for rails < 4; CR: GA