Use /sys/module instead of /proc/modules.