I didn't use any glue to hold things in place until I got the bolts in.
What I did do, and have in the past, is use a few short bits of threaded rod in the heads to hold the gasket in place and line up the covers. You don't need a rod in every hole, maybe three or four of the holes. Then put the bolts in the other holes, do them up hand tight, take the threaded rod out of the other holes and put the bolts in, then do them all up to the appropriate torque.
One day I think I'll replace the bolts with studs and nuts which will do the same job.