[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
Merge pull request #2864 from rxu/ticket/12931

[ticket/12931] Fix general error on user registration