Texas judge rules school district can restrict hair length in male students