A computer simulation study of the influence of a liquid crystal medium on polymerization