Large-scale fabrication of flexible solid-state reference electrodes