My solarstorm lights came with a headtorch mount that you could fit on a helmet either using the straps or a few zip ties. You can buy the mount on its own pretty cheaply on eBay.
I was able to run a magicshine helmet mount on my A1 last year, although the fin thing along the top starts midway on the helmet so it was a tiny bit moveable, but it was a case of ensuring the straps were tight enough to stop any wobble from the light when it was fitted, my biggest problem was not being able to run the cable through a vent on the helmet to stop it flapping about and always being in my peripheral vision.
If it’s a single screw type then here are a few options.
The Hope Universal Bar mount (CRC £7.99) is a decent alterntive to the stretchy O-rings that come with many lights:
You may need to change the screw that comes with it to fit your light to get the right screw diameter and length. I have a cheapo selection box of stove bots which have served me well for various mounts. Screwfix is your friend if you don’t have any lying about.
Also the GoPro camera adapter which is on Amazon at Under £3 and plenty available on Ebay. You’ll need to swap out the quarter inch camera screw and knob for a screw that fits your light. Gives you access to the whole GoPro ecosystem for bar and helmet mounts:
You’ll need to drill a suitable sized hole in the centre of the adapter plate for the screw that goes into the light unit (pics of this in Facebook link below). NB Garmin do a Road and a Mountain version of the adapter. If you go down this route get the Road version. It fits 31.8mm bars but is longer than the Mountain vesrion and gives more mounting options, eg you can have the light slung under the mount by mounting the mount upside down on the bars, and there will be plenty of room to get your fingers between the back of the light and stem faceplate to operate the on/off buttons.
I’m not familiar with the X2 but Googled an MTBR thread with pics that suggest the X2 is quite receptive to a number of different mounting options including the Hope Universal Mount (which is pictured). The mounting area looks quite flat in some of the X2 pics despite the fins. How does it look on your version?