libc: implement rtld_get_stack_prot() for real
(cherry picked from commit 81b3a0a34145ee6c855f50c8035728f76d63c3f0)