Add the required compile flags to set the correct --version output.
--version
First step for #3560 (closed)