add ifdef to Buffer.h