[lit] Use dual-compatible print() syntax where possible.