Pagination fix for rtmedia_gallery shortcode