NMR studies of lithium and sodium battery electrolytes