fix compilation error due to ifdef use