The Trump administration's plan to bar Harvard University from enrolling international students has been blocked by a US judge.