In stead of using void cast, move declaration into ifdef block