fix file upload in overlays

To include files in our upload this uses the FormData API.

Unfortunately, FormData is only available in IE 10+. In older IEs, the whole form will be unusable.

To limit the damage this does only use FormData where necessary.

This was meant to be a fix for #724 but with the limitations mentioned above I am not sure if this counts as one.