Update index.js

content-type based on accept header for iframe upload
Merge pull request #3 from bartont/master

Content-type set for non XMLHttpRequest browsers