Changed the type checking of the "cookiestr" variable in the Cookie constructor to use a constructor name string comparison rather than instanceof, as instanceof was returning false incorrectly for usecases with the Swagger JS generator (maybe due to Swagger JS using an local copy of cookie?