An inverse problem arising from polarimetric measurements of nematic liquid crystals