Workers can wear beards, Japanese court rules