Electrochemical sensors with solid polymer electrolytes