Manny Pacquiao has claimed the IBO light-welterweight title after flooring Ricky Hatton in the second round.