Snakes are perfectly capable of recognizing non-moving prey. Their eyesight is rather poor, but other senses help them to recognize prey. The most important sense is their sense of smell. They may use it to recognize stationary food items. They pick up particles in the air on their tongues and an organ beyond the roof of the mouth analyzes these particles.
Some snakes are capable of detecting body heat of prey items.
These pits are very sensitive. Also, even true vipers are capable of detecting heat well through nerves in the face. In other words, even though snakes are not capable of recognizing prey simply by sight alone, they use other senses to supplement vision. Well, snakes go under the frostline, of course. But this depends on the climate.