I had the same problem (Win7 x64, but compiling for both x86 and x64), this solved it: '?do=embed' frameborder='0' data-embedContent>>
It seems that Avast has the nasty habit of pre-running unknown programs, then - after silently verifiying they contain no threats - running them again.
BTW, it also took forever for the script to start.
Hope that helps.