U.S. shares follow global markets lower after Greece vote