This "convulted version checking method" is the default way to do it with Java, I'm not sure if there's any other programming languages that do it as well.
Python for example wraps GetVersionEx appropriately with sys.getwindowsversion()
[1] https://searchcode.com/?q=if%28version%2Cstartswith%28%22win...
[2] http://docs.oracle.com/javase/tutorial/essential/environment...