Use analogPinToChannel if it's defined

See https://github.com/arduino/Arduino/issues/1366