Make sure DLT has been checked.

If pcap_datalink() is not called at least once before pcap_next(),
pcap_next_ex(), pcap_dispatch() or pcap_loop() print an error message
and abort.

Tested by modifying tests/nonblocktest.c to not call pcap_compile, which
has a side effect of calling pcap_datalink().