Rivet the mounting brackets to the top of the frame. Then just screw on the gas tank.
#1 rivits will not be strong enough to hold a full tank of gas.
#2 everyone always advises against drilling holes in bike frames, and rivits would require drilling holes in the frame.
#3 rivits are normally made out of aluminum, and with the weight of a full tank of gas, vibrations from the engine on the frame and from bumps in the road, the rivits will eventually work themselves loose, or break.
#4 jb weld MAY work for awhile but i wouldn't trust is as the only thing holding the gas tank to the frame. EVERY area that comes in contact with the j.b. weld must be 100% clean for it to bond. If there's paint on the frame tube, you would have to sand it down to bare metal because j.b. weld will not bond with paint. You would also have to sand down the underside of the tank where the j.b. weld would be. It may stick to a painted surface, but it will not bond with it, which is 2 different things. This of corse, would promote rusting on the frame tube (unless you have an alumnum frame) and the gas tank unless you somehow can paint over the 2 areas after you smear j.b. weld in there.
The best idea yet is the one redbaronx has suggested. buy using long nuts like shown,which will allow you to add more threaded rod to extend the stock studs. This idea may not look very good, but if looks don't matter it will work.
if you are very concerned about the looks, you could remove the stock studs and braze longer studs to the tank in their place. This would be major work if you don't know how to do it.