Php function to get js libraries from Google CDN, with a fallback to local storage