IE bug fixed.

'forEach' instruction does not exist 'natively' in IE. I replaced it by a 'for' loop.  I've added the useSSL condition as well. I prefer to use jasmine unit test, I hope you don't mind :)