Hasse invariants for Hilbert modular varieties