Ferroelectric instability of two-dimensional crystals