I've only done the springs with the head off but you can purchase a device to screw into the spark plug hole and pressurise the cylinder to hold the valves shut.
Another option I've seen used it so roll the engine to just short of TDC and feed string/rope into the cylinder (make sure you tie of the end outside of the cylinder) and then roll the engine up to TDC. This will compress the string/rope into the combustion chamber and hold the vales in place.