Inconsistent convention for complex derivatives
The convention for the handling of complex derivatives in JAX seems to be mixed. Consider the following two implementations of the abolute value function.
```py
import jax.numpy as np
from jax import grad

def f(x):
    return np.abs(x)

def g(x):
    return np.sqrt(np.real(x)**2 + np.imag(x)**2)

df = grad(f)
dg = grad(g)

print('gradient by df: ',df(1.0+0.5j))
print('gradient by dg: ',dg(1.0+0.5j))
```
The respective results differ by complex conjugation:
```
gradient by df:  (0.8944272-0.4472136j)
gradient by dg:  (0.8944272+0.4472136j)
```
diff --git a/jax/lax/lax.py b/jax/lax/lax.py
index 675e6200f..26fff8a98 100644
--- a/jax/lax/lax.py
+++ b/jax/lax/lax.py
@@ -1608,12 +1608,12 @@ real_p = unop(_complex_basetype, _complex, 'real')
 ad.deflinear(real_p, lambda t: [complex(t, onp.zeros((), _dtype(t)))])
 
 imag_p = unop(_complex_basetype, _complex, 'imag')
-ad.deflinear(imag_p, lambda t: [complex(onp.zeros((), _dtype(t)), t)])
+ad.defjvp(imag_p, lambda g, _: real(mul(_const(g, -1j), g)))
 
 _complex_dtype = lambda dtype, *args: (onp.zeros((), dtype) + onp.zeros((), onp.complex64)).dtype
 complex_p = binop(_complex_dtype, [_complex_elem_types, _complex_elem_types],
                   'complex')
-ad.deflinear(complex_p, lambda t: [real(t), imag(t)])
+ad.deflinear(complex_p, lambda t: [real(t), imag(neg(t))])
 
 conj_p = unop(_complex_dtype, _float | _complex, 'conj')
 
diff --git a/tests/lax_test.py b/tests/lax_test.py
index 3da63b8a9..aafa32193 100644
--- a/tests/lax_test.py
+++ b/tests/lax_test.py
@@ -1523,10 +1523,10 @@ LAX_GRAD_OPS = [
 
     grad_test_spec(lax.real, nargs=1, order=2, rng=jtu.rand_default(),
                    dtypes=[onp.complex64]),
-    # grad_test_spec(lax.imag, nargs=1, order=2, rng=jtu.rand_default(),
-    #                dtypes=[onp.complex64]),  # TODO(mattjj): enable
-    # grad_test_spec(lax.complex, nargs=2, order=2, rng=jtu.rand_default(),
-    #                dtypes=[onp.float32]),  # TODO(mattjj): enable
+    grad_test_spec(lax.imag, nargs=1, order=2, rng=jtu.rand_default(),
+                   dtypes=[onp.complex64]),
+    grad_test_spec(lax.complex, nargs=2, order=2, rng=jtu.rand_default(),
+                   dtypes=[onp.float32]),
     grad_test_spec(lax.conj, nargs=1, order=2, rng=jtu.rand_default(),
                    dtypes=[onp.float32, onp.complex64]),
     grad_test_spec(lax.abs, nargs=1, order=2, rng=jtu.rand_positive(),
['tests/lax_test.py', 'jax/lax/lax.py']