web.js: fix buffer encoding problem on heroku