use https when tls.Config is provided
Merge pull request #27 from daaku/master

use https when tls.Config is provided