minor code cleanups

Update header include statements, replace __va_list with va_list and undefine pagesize before defining.