make it compatible for both Rails3 & 4

in Rails4, the scope doesn't quite work.
when access `ActionMailerQueue::Store`
error msg: `Mysql2::Error: Incorrect table name '': SELECT ``.* FROM ```