fix undefined variable
fix link error in mingw
update version