js: Only autodetect utf-8 if Content-Type does not specify charset