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