Do not cast to int as this overflows values larger than 2GB for filesizes on some PHP versions #2004