Refine checks for resource.h

The addition of getrusage in 369a530 had a dependency not evident when
testing in OS X.

This change wraps getrusage with a test for the header that @ant1
caught.  @bcarrier suggested using that symbol, and with the way it
pops up in Hashdeep, it looks worth using.