Support HTML 5 galleries

https://core.trac.wordpress.org/ticket/26697