I'm going to echo Nermal's comments in this thread so far: Though it is not an officially stated practice, Apple will support an OS with regular updates until its successor is released, at which point it gets regular security updates until it reaches the point where it is three versions behind the then-current. This means that, even though your iMac is not compatible with Mojave, you can stay on High Sierra and know that Apple will still patch your OS for another two years.
Though you can hack Mojave onto your current system, my main question to you is why? If you feel the need to test out Mojave's features, I'd strongly recommend buying the latest version of VMware Fusion, spinning up a VM and installing Mojave on that VM. That's not to say that a good old fashioned session of hackery isn't fun. Just more that your iMac likely won't have that great of a time even if you are successful.
In the interim, I would look into a new Mac. If, in two years time, you find yourself still wanting to use that computer but not happy with the fact that you won't have a supported OS, Windows 8.1 and Windows Server 2012 R2 both have support through 2023. There will surely also be many great Linux variants that will likely run decently on your iMac that you will surely be able to run on your iMac well past 2023. Just know that you have options beyond Apple's.