Check API version before using the correct call