Writing a piece of code that resets that one particular variable on each boot?
Sorry, but that's just nasty. There is no reason to do that if the goal is just to provide best experience on supported OS.
Although I agree that it's unlikely this was targetted specifically against GNU/Linux and other OSes. The most important thing would be that Windows 7, 8 and older won't boot anymore.