Fix Javascript syntax errors when using form prefixes (fixes #40)