Optical ion sensing with immobilized thin films of photocrosslinked decyl methacrylate