[Rakefile] Support for deprecated hooks