Fiber pH sensor based on long period gratings