Follow the deprecation note of 2.1 migration guide 

Switch to fetch('title')

This would be the quick way. And then drop the old "title_for_layout" in 3.0 alltogether.
We could also make it a complete rewrite now.