https fix for ruby 1.8/1.9