Fix probe_modules.c for BSD