Move the preloader script to <head> tag