Sensitivity of Wood-Rayleigh anomalies in metallic nanogratings