changed preprocessor directive to match all versions