Added CoreData conditional compilation

Making possible to use it without linking CoreData framework