Alignment of the ALICE Inner Tracking System with cosmic-ray tracks