wscript: fix darwin build, move flags to configure, clean up