Dynamic response of unreinforced masonry buildings with flexible diaphragms