Make title_def parameter optional in mako head function

Maintain backward compatible to before
db968b18f77cbb5af073623ef0f09549a9694624.