Added extra ifdef. Corrected issue found when compiling for Windows.