Handle madvise() failure on stale kernel

MADV_DONTDUMP may be defined by the system headers, but not supported
by the running kernel. In this case madvise() returns EINVAL. We should
treat this as an expected error, rather than a fatal one.

An argument could be made for ignoring madvise()'s return value entirely,
but this change seems more in line with the existing code base.