initialise port to 0, wildcard address test fails on OSX
initialize port only if addr is not NULL
Merge pull request #63 from bearnard/master

initialize port to 0, wildcard address test fails on OSX