Make download progress be correctly displayed

Make download progress be correctly displayed when the browser cannot report total size of files (as is the case in compressed downloads), but writing full size to the generated js.