Thanks! Turns out that was the bit I was missing. cpw.mods.fml was in the workspace (project in intellij), but only partly.
If it helps anyone, to import the classes go to File->Project Structure, select libraries and add a new library (the + at the top of the middle column) then add the forge\mcp\bin\minecraft folder, then add forge\mcp\src\minecraft to the project library (the + in the right column). Assuming all the other imports are OK, it should compile ok.
I'll get around to sticking a tutorial for setting up intellij in the wiki at some point.