Only set gcrypt thread callback for older version of gcrypt.