Transversals in generalized Latin squares