Islamists planned to hit US base — Spanish court