Lionel Messi scored just two minutes as Inter Miami beat Philadelphia Union 2-1 in Major League Soccer.