Resonant grating sensors using frustrated total-internal reflection