made accelerometer test program compatible with older compilers