base: fix NS_ERROR_XPC_BAD_CONVERT_JS on Firefox. Fixes #718

(cherry picked from commit 03b71e31e79bb5204d6760c28959ada0fbfc1767)

Conflicts:
	modules/mod_base/lib/js/apps/zotonic-1.0.js