North Korea agrees to inspect its nuclear facilities