fix possible error if gen_versions.h does not exists, happens on my msys
set lib paths correctly for windows