avoid pagesize redefinition

add ifndef PAGESIZE to avoid redefinition warning on platforms
where this value is already provided.
replace __va_list with va_list

most of the codebase already uses va_list, which is specified by
iso-c. gcc/glibc provides 'typedef __gnuc_va_list va_list'. and
when not using gcc/glibc we can't expect to find __gnuc_va_list.