Factor version number out in C++ code

* Fewer places to update with the version number.
* Linux can now use this natively rather than passing via Makefile var