Detect protocol if not provided, fixes #42