Fix debug-mode build for Linux, and update scripts;