Ilicic hat-trick in eight-goal thriller