The 4D SU(3) gauge theory with an imaginary theta term