[ticket/12849] Fixed possible ReferenceError in core.js.

https://tracker.phpbb.com/browse/PHPBB3-12849