Remove set (but unused) variable to silence warning.
Fix compiler error (and bug).
Remove set (but unused) variable to silence warning.
Explicitly include sys/resource.h in Linux.

Patrick pointed out that without this, the monitor does not compile on
the latest Arch 64 bit.