Media: Japan gov't agrees to buy disputed islands