copycat commit from ndbroadbent as discussed in issue 63 of dj

https://github.com/ndbroadbent/delayed_job_active_record/commit/d311b55f1eb4567d18627b8424c9042b0260776f
https://github.com/collectiveidea/delayed_job_active_record/issues/63