set timeout for CharDet.detect