Fix usePoly to work with web workers