Judge rules Hasan can be forcibly shaved for trial