simpler approach for Apple setrlimit() compatibility issue