[ticket/12931] Fix general error on user registration

Fix "Illegal use of $_SERVER" general error on user registration
when $config['server_name'] is not set.

PHPBB3-12931