Added ifdef to compas accelerometer.