Japan building base to fight Somali pirates