Long-range ferromagnetism in hybrid compounds: The role of dipolar interactions