form.js: fix compatibilities with Firefox