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.

This builds in:
* CentOS 6.4
* Debian 7.0.0
* Fedora 19
* Ubuntu 13.04
* OS X 10.8.5