Small businesses are less optimistic in June, survey finds