Fixed issue with UTF-8 line terminators in javascript output