Fix for packet writing to make it use the global snaplength.