Fix Javascript problem where csrf_token function is overwritten.

csrf_check.js overwrites csrf_token function from csrf_init.js with a variable. Probably this variable should be local, so this changes it to that. This seems to fix #580.