Check for HTTPS ajax URL before making absolute

To allow HTTPS ajax calls, tweak the method to check whether URLs start with either before prepending full url.