Avoid warnings about unknown terminal when executing remotely

@see #637