Added support for APM 2.5 (should work on 2.6 as well)