The Origin of X-Ray Pulsars in Binary Systems