Move transaction compatibility switch to utils.compat