app: fix volatile read for GCC >= 4.6