Mid-infrared process control systms for polymer melts and film