Prefer .toString() instead of cast(string) when converting values to string in Diet templates. Fixes #714.