RLIMIT_AS: make sure it is defined before using it

Not all operating systems provide RLIMIT_AS, so make sure it is defined
before we try to use it.

https://bugzilla.gnome.org/show_bug.cgi?id=708666