US pastor denies terror links, spying in Turkish court