Fix invocation of GetInputMemoryType. (#13828)
### Description
GetInputMemoryType was introduced in ver 13 in [this
PR](https://github.com/microsoft/onnxruntime/pull/10879). The ver check
introduced in this PR allows custom ops compiled using older versions to
work with newer versions (> 12) of the ORT binary.
### Motivation and Context
Fixes binary compatibility.