set User-Agent header properly when doing file upload

Cordova now setting it to a weird value, so override with navigator.userAgent