Use sysctl module instead of libc hacks