talloc: also use portable __has_attribute macro to check for attribute support