Gauged sigma-models with nonclosed 3-form and twisted Jacobi structures