Use CURL to get filesize on 32bit systems.

@DeepDiver1975 Feel free to throw this at customers complaining about filesize issues in 32bit systems.

This needs some more testing before it can be merged.