Client JS: use main(), not global statements. Friendly error message for old browsers. Fixes #53