Making paging and panic code slightly more portable