Fix inability to upload files on Flashless browsers

Affected browsers are Firefox (including version 21) and Safari
(including version 6).