Make the layout work with both Masonry and without JS.