President Barack Obama hails the Dalai Lama as a "good friend" at a first public encounter between the two men that is sure to infuriate Beijing.