Define AF_APP_EXTENSION based on availability with the preprocessor

As seen on Availability.h
Merge pull request #2346 from dtorres/auto-extension-availability

Define AF_APP_EXTENSION based on availability with the preprocessor