Senate passes farm bill; President plans to sign into law