Lancashire deal for Flintoff