Switch CartoDB API calls back to https and add partial CORS detection (IE8 and 9)