Minor bug fixes

Fixes a minor compilation warning: htons() and htonl() definition were
missing.