test: inputSpec: check for existence before using a typed array class
browser: do not override mime type, if xhr2

fixes tests on opera-11.60 which when overriding with
'text/plain; charset=x-user-defined' and setting xhr.responseType to
'arraybuffer' produces bytes [1, 0, 2, 0, 3, 0] when expected are [1, 2, 3]