Use reflection to call setMaxAttempts and setKeepContainersAcrossApplicationAttempts as they are only available on YARN >= 2.4.0