Add missing include for distance routine.