Unbreak getTcpTable() on Linux-based systems and make it work on BSD