only include pager JS if pages exist