Modify loader.js for ios to avoid white screen flash