attempt to support active record 4.0.1