handle old pagination API to be compat with wp-paginate