using reflection to access the getTaskCompletionEvents method for all versions of hadoop