Search for long-lived gravitational-wave transients coincident with long gamma-ray bursts