use availability macros for better compatibility