some updates to ampjs for ssl / mutual auth support