Support running this script from a non-terminal environment

I run this script to run maven from my IDE. My version doesn't try to activate if $TERM_PROGRAM is unset.