Refactor dependency management script and fix win32 & win64 builds