Update JS initialization snippet. Fix #56 (Thanks @refractalize!). Possibly fixes #52.