properly defaults opts if only onConnect is supplied. closes #21