That's no sweat, and it's worth repeating. Free is for me too. I'm a garbage picker from way back
I've used gorilla glue too. Any polyurethane based construction adhesive works, but any glue with solvents in it will melt it. I'll bet water based contact cement would be a option as well. But, I've never found ANY glue that makes a strong bond...a little force and the foam lets go. I've used drywall screws to hold it while the glue dries...you just have to drive and tighten the screws carefully to not strip the holes.
A little MORE about the foam, in case anyone is interested...
Cut it, grind, file, sand, with just about any tool you can think of.
You can form it some with a torch if you're careful...but don't breath those fumes.
It's tough enough to walk on, and a good option to lay in front of your garage or basement work bench...soft under your feet and WAY warmer than standing on concrete...just hard to keep it in place.
It's verry warm to sit on, and is great on a bench or picnic table seat...almost like one of those hunters type seat pads...feels like it's heated.
It WILL compress...flatten out, under feet or butts, over years...yes, years of time depending on use.
The density of it is excellent for packaging heavy items. It will dent if you drop a motor on it, but it will mostly bounce back. You'd have to drop a motor on the same spot 5 times before it flattened out the foam.