Add antlr directory to linker path to fix a linker error
Improve version.sh script

Before making any changes to the gen_version.h file check if the number
of the last git commit actually changed. If not don't touch the file.

Enable the version.sh script also for debug mode. With the above change
the program is not compiled and linked every time again, so there's no
reason to not run this. This also fixes a build error for those people
just checking out the repository and doing a debug build.