Make it compile without deprecated method

Authored by mlaurent on Thu, May 23, 6:01 AM.