[V2] Rails3 compatibility: replace after_initialize

rebased #321.