Fixes to make masonry build with my current project.