Batalin-Vilkovisky structures on Ext and Tor