DOCTYPE must be set before anything else

By setting doctype before settings.php, the script elements etc are
loaded after defining the doctype to be html5. This issue only affects
IE9 and not Chrome or Firefox.