[WebRTC] Update main.js to match code on crosswalk-samples