Gallery shortcode compatibility fix

WordPress 3.5 introduced an additional attribute for the gallery shortcode.