Add missing defines and includes