Fix for activesupport < 4.0