fix ajax requests when using ssl