You should have a nice styrene plate, with a hole to fit around your iMac stand.
Place the styrene over the stand, mine was a nice fit, so I was able to position the stand just right before gluing. On the front I decided to glue on a nice section of leather to prevent the stand from scratching the back of the iPad.
I use hot glue a lot on this project, I knew it was the safest glue for using with gadgets, super glue can leave fume marks, and epoxy resin can leave residue.
Once you have the stand wedged how you want it, cover up the back and gaps with masking tape, this will stop the glue escaping out the back
Using a glue gun you can inject the hot glue into and around the metal stand, fill up the gaps and get a good seal, quickly while the hot glue is till hot place the leather on the front.
Once set, I then ran more hot glue around the edge of the leather.
You can peal off the masking tape a little, and fill in any gaps from the other side also, recover with masking tape to shape the hot glue.