fix possible error if gen_versions.h does not exists, happens on my msys
set lib paths correctly for windows
belongs to previous commit, my --amend failed
Simplify version.sh script

The else branch is not needed - and the variable name in it is
misspelled anyway ;)