Put variable declaration inside an #ifdef to avoid an unused variable warning.