Now support ActiveRecord < 4. Quite hacky for now, but I will come back and fix