Adjust types and remove casts

Add improvements coming from pull request

* pf/libpcap.lua