load the cors support function in wrong place

which make it not work with grease monkey script