added optional define.
Added more comprehensive conditional define.