Sudan says coup thwarted, accuses Bashir loyalist