Derivation of displacement-based fragility functions for masonry buildings