Minor fix in JavaScript anti-spam test.

Changed algorithm to build JavaScript key.