Alignment of the ALICE inner tracking system with cosmic-ray tracks