use $TERM_PROGRAM if available

fixes #3