When you come to a stop normally, the brakes don't pulse when you stop. Since the car can only know its speed by the rotation of the wheels, how can it distinguish between the car is stopped normally and the car wheel's stopped rotating because they locked up?
You are correct that the car can't use the speedometer output for this. Instead there are sensors on the brakes that measure how quickly the wheel rotation is decelerating. If this is faster than the brakes can actually slow the car down, then it means the breaks are locking up and it is only slowing the wheels.
For more information and images, check out this link: http://auto.howstuffworks.com/auto-parts/brakes/brake-types/anti-lock-brake.htm